<?php
use yii\helpers\Html;
use yii\grid\GridView;

$this->title = '帮助中心列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div>
    <?php \yii\widgets\Pjax::begin(['id' => 'table-Show-help']); ?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            'help_center_id',
            'title',
            //'is_show',
            [
                'label' => '是否显示',
                'format' => 'raw',
                'value' => function($data) {
                    $statusArr = [0 => '<span style="color:#999;">不显示</span>', 1 => '<span style="color:green;">显示</span>'];
                    return Html::label($statusArr[$data['is_show']]);
                }
            ],
            'create_time',
            'update_time',
            /*[
                'label' => '操作',
                'format' => 'raw',
                'value'=> function($data){
                    return Html::a('修改', '?r=help-center/update&id=' . $data['help_center_id'], ['class' => 'btn btn-primary']);
                }
            ]*/
            ['class' => 'yii\grid\ActionColumn','template'=>'{update}'],
        ]
    ]); ?>

    <?php \yii\widgets\Pjax::end()?>
</div>